import numpy as np

def fun(p):
    for i in range(len(p)-1):
        for j in range(i+1,len(p)):
            if(p[i] == p[j]):
                return i,p[i]
    return None

def fun2(p):
    index,value = [],[]
    for i in range(len(p)-1):
        for j in range(i+1,len(p)):
            if(p[i] == p[j]):
                index.append(i)
                value.append(p[i])
    return (index, value)


p = [np.random.randint(10) for i in range(10)]
print(p)

print(fun(p))
print(fun2(p))
